package fr.channel.client.activity;

import com.google.gwt.activity.shared.AbstractActivity;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.place.shared.Place;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.inject.Inject;

import fr.channel.client.PartieService;
import fr.channel.client.PartieServiceAsync;
import fr.channel.client.ChannelTest;
import fr.channel.client.ClientFactory;
import fr.channel.client.metier.SmChannel;
import fr.channel.client.view.AttenteView;
import fr.channel.client.view.ConnectionView;

public class AttenteActivity extends AbstractActivity implements
		AttenteView.Presenter {

	private ClientFactory clientFactory; 

	// Create a remote service proxy to talk to the server-side service.
	private final PartieServiceAsync channelService = GWT
			.create(PartieService.class);

	private SmChannel smChannel;
	
	private EventBus eventBus;

	@Inject
	public AttenteActivity(final ClientFactory pClientFactory, final SmChannel pSmChannel) {
		super();
		this.clientFactory = pClientFactory;
		this.smChannel = pSmChannel;
	}

	@Override
	public final void start(final AcceptsOneWidget panel, final EventBus pEventBus) {
		AttenteView attenteView = clientFactory.getAttenteView();
		attenteView.setPresenter(this);
		panel.setWidget(attenteView.asWidget());
		this.eventBus = pEventBus;

	}
}
